/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * JCLOUD LOGS API
 * logs API
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Logs.Apis;
using JDCloudSDK.Logs.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Logs.Client
{
    /// <summary>
    ///  JCLOUD LOGS API
    ///  logs API
    ///  Logs Api 客户端
    ///</summary>
    public class LogsClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private LogsClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public LogsClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public LogsClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public LogsClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.8
        ///</summary>
        public const string ClientVersion = "1.2.8";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "logs.jcloud.com";
        private const string serviceName = "logs";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  查询日志主题基本信息。如配置了采集配置，将返回采集配置的UID
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeLogtopicResponse DescribeLogtopic(DescribeLogtopicRequest request) {
            return  new DescribeLogtopicExecutor().Client(this).Execute<DescribeLogtopicResponse, DescribeLogtopicResult, DescribeLogtopicRequest>(request);
        }
#else
        /// <summary>
        ///  查询日志主题基本信息。如配置了采集配置，将返回采集配置的UID
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeLogtopicResponse> DescribeLogtopic(DescribeLogtopicRequest request) {
            return await new DescribeLogtopicExecutor().Client(this).Execute<DescribeLogtopicResponse, DescribeLogtopicResult, DescribeLogtopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询采集配置的实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeCollectResourcesResponse DescribeCollectResources(DescribeCollectResourcesRequest request) {
            return  new DescribeCollectResourcesExecutor().Client(this).Execute<DescribeCollectResourcesResponse, DescribeCollectResourcesResult, DescribeCollectResourcesRequest>(request);
        }
#else
        /// <summary>
        ///  查询采集配置的实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeCollectResourcesResponse> DescribeCollectResources(DescribeCollectResourcesRequest request) {
            return await new DescribeCollectResourcesExecutor().Client(this).Execute<DescribeCollectResourcesResponse, DescribeCollectResourcesResult, DescribeCollectResourcesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新日志主题。日志主题名称不可更新。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateLogtopicResponse UpdateLogtopic(UpdateLogtopicRequest request) {
            return  new UpdateLogtopicExecutor().Client(this).Execute<UpdateLogtopicResponse, UpdateLogtopicResult, UpdateLogtopicRequest>(request);
        }
#else
        /// <summary>
        ///  更新日志主题。日志主题名称不可更新。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateLogtopicResponse> UpdateLogtopic(UpdateLogtopicRequest request) {
            return await new UpdateLogtopicExecutor().Client(this).Execute<UpdateLogtopicResponse, UpdateLogtopicResult, UpdateLogtopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询日志集列表。支持按照名称进行模糊查询。结果中包含了该日志集是否存在日志主题的信息。存在日志主题的日志集不允许删除。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeLogsetsResponse DescribeLogsets(DescribeLogsetsRequest request) {
            return  new DescribeLogsetsExecutor().Client(this).Execute<DescribeLogsetsResponse, DescribeLogsetsResult, DescribeLogsetsRequest>(request);
        }
#else
        /// <summary>
        ///  查询日志集列表。支持按照名称进行模糊查询。结果中包含了该日志集是否存在日志主题的信息。存在日志主题的日志集不允许删除。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeLogsetsResponse> DescribeLogsets(DescribeLogsetsRequest request) {
            return await new DescribeLogsetsExecutor().Client(this).Execute<DescribeLogsetsResponse, DescribeLogsetsResult, DescribeLogsetsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询监控任务列表，返回该主题下的所有监控任务信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMetricTasksResponse DescribeMetricTasks(DescribeMetricTasksRequest request) {
            return  new DescribeMetricTasksExecutor().Client(this).Execute<DescribeMetricTasksResponse, DescribeMetricTasksResult, DescribeMetricTasksRequest>(request);
        }
#else
        /// <summary>
        ///  查询监控任务列表，返回该主题下的所有监控任务信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMetricTasksResponse> DescribeMetricTasks(DescribeMetricTasksRequest request) {
            return await new DescribeMetricTasksExecutor().Client(this).Execute<DescribeMetricTasksResponse, DescribeMetricTasksResult, DescribeMetricTasksRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新解析配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateParserResponse UpdateParser(UpdateParserRequest request) {
            return  new UpdateParserExecutor().Client(this).Execute<UpdateParserResponse, UpdateParserResult, UpdateParserRequest>(request);
        }
#else
        /// <summary>
        ///  更新解析配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateParserResponse> UpdateParser(UpdateParserRequest request) {
            return await new UpdateParserExecutor().Client(this).Execute<UpdateParserResponse, UpdateParserResult, UpdateParserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询指定监控任务的详情信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeMetricTaskResponse DescribeMetricTask(DescribeMetricTaskRequest request) {
            return  new DescribeMetricTaskExecutor().Client(this).Execute<DescribeMetricTaskResponse, DescribeMetricTaskResult, DescribeMetricTaskRequest>(request);
        }
#else
        /// <summary>
        ///  查询指定监控任务的详情信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeMetricTaskResponse> DescribeMetricTask(DescribeMetricTaskRequest request) {
            return await new DescribeMetricTaskExecutor().Client(this).Execute<DescribeMetricTaskResponse, DescribeMetricTaskResult, DescribeMetricTaskRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  自定义日志上报。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public PutResponse Put(PutRequest request) {
            return  new PutExecutor().Client(this).Execute<PutResponse, PutResult, PutRequest>(request);
        }
#else
        /// <summary>
        ///  自定义日志上报。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<PutResponse> Put(PutRequest request) {
            return await new PutExecutor().Client(this).Execute<PutResponse, PutResult, PutRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建日志消费
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateSubscribeResponse CreateSubscribe(CreateSubscribeRequest request) {
            return  new CreateSubscribeExecutor().Client(this).Execute<CreateSubscribeResponse, CreateSubscribeResult, CreateSubscribeRequest>(request);
        }
#else
        /// <summary>
        ///  创建日志消费
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateSubscribeResponse> CreateSubscribe(CreateSubscribeRequest request) {
            return await new CreateSubscribeExecutor().Client(this).Execute<CreateSubscribeResponse, CreateSubscribeResult, CreateSubscribeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除日志集,删除多个日志集时，任意的日志集包含了日志主题的，将导致全部删除失败。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteLogsetResponse DeleteLogset(DeleteLogsetRequest request) {
            return  new DeleteLogsetExecutor().Client(this).Execute<DeleteLogsetResponse, DeleteLogsetResult, DeleteLogsetRequest>(request);
        }
#else
        /// <summary>
        ///  删除日志集,删除多个日志集时，任意的日志集包含了日志主题的，将导致全部删除失败。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteLogsetResponse> DeleteLogset(DeleteLogsetRequest request) {
            return await new DeleteLogsetExecutor().Client(this).Execute<DeleteLogsetResponse, DeleteLogsetResult, DeleteLogsetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  搜索日志
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SearchResponse Search(SearchRequest request) {
            return  new SearchExecutor().Client(this).Execute<SearchResponse, SearchResult, SearchRequest>(request);
        }
#else
        /// <summary>
        ///  搜索日志
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SearchResponse> Search(SearchRequest request) {
            return await new SearchExecutor().Client(this).Execute<SearchResponse, SearchResult, SearchRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  日志测试，根据用户输入的日志筛选条件以及监控指标设置进行模拟监控统计
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public TestMetricTaskResponse TestMetricTask(TestMetricTaskRequest request) {
            return  new TestMetricTaskExecutor().Client(this).Execute<TestMetricTaskResponse, TestMetricTaskResult, TestMetricTaskRequest>(request);
        }
#else
        /// <summary>
        ///  日志测试，根据用户输入的日志筛选条件以及监控指标设置进行模拟监控统计
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<TestMetricTaskResponse> TestMetricTask(TestMetricTaskRequest request) {
            return await new TestMetricTaskExecutor().Client(this).Execute<TestMetricTaskResponse, TestMetricTaskResult, TestMetricTaskRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询日志集详情。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeLogsetResponse DescribeLogset(DescribeLogsetRequest request) {
            return  new DescribeLogsetExecutor().Client(this).Execute<DescribeLogsetResponse, DescribeLogsetResult, DescribeLogsetRequest>(request);
        }
#else
        /// <summary>
        ///  查询日志集详情。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeLogsetResponse> DescribeLogset(DescribeLogsetRequest request) {
            return await new DescribeLogsetExecutor().Client(this).Execute<DescribeLogsetResponse, DescribeLogsetResult, DescribeLogsetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  自定义日志上报。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public PushResponse Push(PushRequest request) {
            return  new PushExecutor().Client(this).Execute<PushResponse, PushResult, PushRequest>(request);
        }
#else
        /// <summary>
        ///  自定义日志上报。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<PushResponse> Push(PushRequest request) {
            return await new PushExecutor().Client(this).Execute<PushResponse, PushResult, PushRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新日志消费
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateSubscribeResponse UpdateSubscribe(UpdateSubscribeRequest request) {
            return  new UpdateSubscribeExecutor().Client(this).Execute<UpdateSubscribeResponse, UpdateSubscribeResult, UpdateSubscribeRequest>(request);
        }
#else
        /// <summary>
        ///  更新日志消费
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateSubscribeResponse> UpdateSubscribe(UpdateSubscribeRequest request) {
            return await new UpdateSubscribeExecutor().Client(this).Execute<UpdateSubscribeResponse, UpdateSubscribeResult, UpdateSubscribeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建日志的解析配置。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateParserResponse CreateParser(CreateParserRequest request) {
            return  new CreateParserExecutor().Client(this).Execute<CreateParserResponse, CreateParserResult, CreateParserRequest>(request);
        }
#else
        /// <summary>
        ///  创建日志的解析配置。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateParserResponse> CreateParser(CreateParserRequest request) {
            return await new CreateParserExecutor().Client(this).Execute<CreateParserResponse, CreateParserResult, CreateParserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除日志主题。其采集配置与采集实例配置将一并删除。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteLogtopicResponse DeleteLogtopic(DeleteLogtopicRequest request) {
            return  new DeleteLogtopicExecutor().Client(this).Execute<DeleteLogtopicResponse, DeleteLogtopicResult, DeleteLogtopicRequest>(request);
        }
#else
        /// <summary>
        ///  删除日志主题。其采集配置与采集实例配置将一并删除。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteLogtopicResponse> DeleteLogtopic(DeleteLogtopicRequest request) {
            return await new DeleteLogtopicExecutor().Client(this).Execute<DeleteLogtopicResponse, DeleteLogtopicResult, DeleteLogtopicRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建监控任务，不可与当前日志主题下现有日志监控任务重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateMetricTaskResponse CreateMetricTask(CreateMetricTaskRequest request) {
            return  new CreateMetricTaskExecutor().Client(this).Execute<CreateMetricTaskResponse, CreateMetricTaskResult, CreateMetricTaskRequest>(request);
        }
#else
        /// <summary>
        ///  创建监控任务，不可与当前日志主题下现有日志监控任务重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateMetricTaskResponse> CreateMetricTask(CreateMetricTaskRequest request) {
            return await new CreateMetricTaskExecutor().Client(this).Execute<CreateMetricTaskResponse, CreateMetricTaskResult, CreateMetricTaskRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新采集配置。若传入的实例列表不为空，将覆盖之前的所有实例，而非新增。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateCollectInfoResponse UpdateCollectInfo(UpdateCollectInfoRequest request) {
            return  new UpdateCollectInfoExecutor().Client(this).Execute<UpdateCollectInfoResponse, UpdateCollectInfoResult, UpdateCollectInfoRequest>(request);
        }
#else
        /// <summary>
        ///  更新采集配置。若传入的实例列表不为空，将覆盖之前的所有实例，而非新增。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateCollectInfoResponse> UpdateCollectInfo(UpdateCollectInfoRequest request) {
            return await new UpdateCollectInfoExecutor().Client(this).Execute<UpdateCollectInfoResponse, UpdateCollectInfoResult, UpdateCollectInfoRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  验证日志解析语法
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ValidateParserResponse ValidateParser(ValidateParserRequest request) {
            return  new ValidateParserExecutor().Client(this).Execute<ValidateParserResponse, ValidateParserResult, ValidateParserRequest>(request);
        }
#else
        /// <summary>
        ///  验证日志解析语法
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ValidateParserResponse> ValidateParser(ValidateParserRequest request) {
            return await new ValidateParserExecutor().Client(this).Execute<ValidateParserResponse, ValidateParserResult, ValidateParserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  采集配置的基本信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeCollectInfoResponse DescribeCollectInfo(DescribeCollectInfoRequest request) {
            return  new DescribeCollectInfoExecutor().Client(this).Execute<DescribeCollectInfoResponse, DescribeCollectInfoResult, DescribeCollectInfoRequest>(request);
        }
#else
        /// <summary>
        ///  采集配置的基本信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeCollectInfoResponse> DescribeCollectInfo(DescribeCollectInfoRequest request) {
            return await new DescribeCollectInfoExecutor().Client(this).Execute<DescribeCollectInfoResponse, DescribeCollectInfoResult, DescribeCollectInfoRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建日志集。名称不可重复。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateLogsetResponse CreateLogset(CreateLogsetRequest request) {
            return  new CreateLogsetExecutor().Client(this).Execute<CreateLogsetResponse, CreateLogsetResult, CreateLogsetRequest>(request);
        }
#else
        /// <summary>
        ///  创建日志集。名称不可重复。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateLogsetResponse> CreateLogset(CreateLogsetRequest request) {
            return await new CreateLogsetExecutor().Client(this).Execute<CreateLogsetResponse, CreateLogsetResult, CreateLogsetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新日志集。日志集名称不可更新。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateLogsetResponse UpdateLogset(UpdateLogsetRequest request) {
            return  new UpdateLogsetExecutor().Client(this).Execute<UpdateLogsetResponse, UpdateLogsetResult, UpdateLogsetRequest>(request);
        }
#else
        /// <summary>
        ///  更新日志集。日志集名称不可更新。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateLogsetResponse> UpdateLogset(UpdateLogsetRequest request) {
            return await new UpdateLogsetExecutor().Client(this).Execute<UpdateLogsetResponse, UpdateLogsetResult, UpdateLogsetRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询日志主题列表，支持按照名称模糊查询。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeLogtopicsResponse DescribeLogtopics(DescribeLogtopicsRequest request) {
            return  new DescribeLogtopicsExecutor().Client(this).Execute<DescribeLogtopicsResponse, DescribeLogtopicsResult, DescribeLogtopicsRequest>(request);
        }
#else
        /// <summary>
        ///  查询日志主题列表，支持按照名称模糊查询。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeLogtopicsResponse> DescribeLogtopics(DescribeLogtopicsRequest request) {
            return await new DescribeLogtopicsExecutor().Client(this).Execute<DescribeLogtopicsResponse, DescribeLogtopicsResult, DescribeLogtopicsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  日志消费信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubscribeResponse DescribeSubscribe(DescribeSubscribeRequest request) {
            return  new DescribeSubscribeExecutor().Client(this).Execute<DescribeSubscribeResponse, DescribeSubscribeResult, DescribeSubscribeRequest>(request);
        }
#else
        /// <summary>
        ///  日志消费信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubscribeResponse> DescribeSubscribe(DescribeSubscribeRequest request) {
            return await new DescribeSubscribeExecutor().Client(this).Execute<DescribeSubscribeResponse, DescribeSubscribeResult, DescribeSubscribeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建采集配置，支持基于云产品模板生成采集模板；支持用于自定义采集配置。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateCollectInfoResponse CreateCollectInfo(CreateCollectInfoRequest request) {
            return  new CreateCollectInfoExecutor().Client(this).Execute<CreateCollectInfoResponse, CreateCollectInfoResult, CreateCollectInfoRequest>(request);
        }
#else
        /// <summary>
        ///  创建采集配置，支持基于云产品模板生成采集模板；支持用于自定义采集配置。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateCollectInfoResponse> CreateCollectInfo(CreateCollectInfoRequest request) {
            return await new CreateCollectInfoExecutor().Client(this).Execute<CreateCollectInfoResponse, CreateCollectInfoResult, CreateCollectInfoRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取解析配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeParserResponse DescribeParser(DescribeParserRequest request) {
            return  new DescribeParserExecutor().Client(this).Execute<DescribeParserResponse, DescribeParserResult, DescribeParserRequest>(request);
        }
#else
        /// <summary>
        ///  获取解析配置
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeParserResponse> DescribeParser(DescribeParserRequest request) {
            return await new DescribeParserExecutor().Client(this).Execute<DescribeParserResponse, DescribeParserResult, DescribeParserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新监控任务，日志监控任务不许重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateMetricTaskResponse UpdateMetricTask(UpdateMetricTaskRequest request) {
            return  new UpdateMetricTaskExecutor().Client(this).Execute<UpdateMetricTaskResponse, UpdateMetricTaskResult, UpdateMetricTaskRequest>(request);
        }
#else
        /// <summary>
        ///  更新监控任务，日志监控任务不许重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateMetricTaskResponse> UpdateMetricTask(UpdateMetricTaskRequest request) {
            return await new UpdateMetricTaskExecutor().Client(this).Execute<UpdateMetricTaskResponse, UpdateMetricTaskResult, UpdateMetricTaskRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除指定监控任务。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteMetricTaskResponse DeleteMetricTask(DeleteMetricTaskRequest request) {
            return  new DeleteMetricTaskExecutor().Client(this).Execute<DeleteMetricTaskResponse, DeleteMetricTaskResult, DeleteMetricTaskRequest>(request);
        }
#else
        /// <summary>
        ///  删除指定监控任务。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteMetricTaskResponse> DeleteMetricTask(DeleteMetricTaskRequest request) {
            return await new DeleteMetricTaskExecutor().Client(this).Execute<DeleteMetricTaskResponse, DeleteMetricTaskResult, DeleteMetricTaskRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  扫描日志
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GetLogsResponse GetLogs(GetLogsRequest request) {
            return  new GetLogsExecutor().Client(this).Execute<GetLogsResponse, GetLogsResult, GetLogsRequest>(request);
        }
#else
        /// <summary>
        ///  扫描日志
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GetLogsResponse> GetLogs(GetLogsRequest request) {
            return await new GetLogsExecutor().Client(this).Execute<GetLogsResponse, GetLogsResult, GetLogsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  增量更新采集实例列表。更新的动作支持 add 、 remove
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateCollectResourcesResponse UpdateCollectResources(UpdateCollectResourcesRequest request) {
            return  new UpdateCollectResourcesExecutor().Client(this).Execute<UpdateCollectResourcesResponse, UpdateCollectResourcesResult, UpdateCollectResourcesRequest>(request);
        }
#else
        /// <summary>
        ///  增量更新采集实例列表。更新的动作支持 add 、 remove
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateCollectResourcesResponse> UpdateCollectResources(UpdateCollectResourcesRequest request) {
            return await new UpdateCollectResourcesExecutor().Client(this).Execute<UpdateCollectResourcesResponse, UpdateCollectResourcesResult, UpdateCollectResourcesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建日志主题，不可与当前日志集下现有日志主题重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateLogtopicResponse CreateLogtopic(CreateLogtopicRequest request) {
            return  new CreateLogtopicExecutor().Client(this).Execute<CreateLogtopicResponse, CreateLogtopicResult, CreateLogtopicRequest>(request);
        }
#else
        /// <summary>
        ///  创建日志主题，不可与当前日志集下现有日志主题重名。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateLogtopicResponse> CreateLogtopic(CreateLogtopicRequest request) {
            return await new CreateLogtopicExecutor().Client(this).Execute<CreateLogtopicResponse, CreateLogtopicResult, CreateLogtopicRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认LogsClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>logsClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>logsClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>logsClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造LogsClient 对象
                ///</summary>
                LogsClient Build();
            }

            /// <summary>
            ///  默认LogsClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  LogsClient service client
                /// </summary>
                private  LogsClient logsClient;

                /// <summary>
                ///  默认LogsClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    logsClient = new LogsClient();
                }

                /// <summary>
                ///  构造LogsClient 对象
                ///</summary>
                public LogsClient Build()
                {
                    if (logsClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        logsClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (logsClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("LogsClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (logsClient.HttpRequestConfig == null)
                    {
                        logsClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (logsClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("LogsClient build error: http request config not set");
                        }
                    }
                    return logsClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>logsClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    logsClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>logsClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    logsClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>logsClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    logsClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
